package com.hua.controller;


import com.hua.service.CanteenService;
import com.hua.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hua
 * @since 2023-12-24
 */
@Api(tags = "饭堂管理")
@RestController
@RequestMapping("/canteen")
public class CanteenController {



    @Autowired
    private CanteenService canteenService;

    @ApiOperation("获取首页饭堂显示列表API----1")
    @GetMapping("/getCanteenList")
    public Result getCanteenList(){
        //调用数据层查询结果返回
        Map<String, Object> canteenList = canteenService.getCanteenList();
        //把查询出来的数据返回给前端
        return Result.success(canteenList,"获取首页饭堂显示列表的数据成功！");
    }



}

